home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <hamdefs.h>
-
- showtime(r, c)
- int r, c;
- {
- int h, m, s, hs;
- int hour;
- char string[20], desig;
-
- if (r < 0) {
- clrblk((-r) - 1, c - 1, (-r) + 1, c + 8);
- return 0;
- }
- getsytim(&h, &m, &s, &hs);
-
- hour = h;
-
- desig = 'a';
-
- if (h > 11)
- desig = 'p';
-
- if (h == 0)
- hour = 12;
-
- if (hour > 12)
- hour -= 12;
-
- sprintf(string, "%2d:%02d %cm", hour, m, desig);
- csrpush();
- scrbox(r - 1, c - 1, r + 1, c + 8, 1, NORMAL);
- atputsha(r, c, string);
- csrpop();
- return 0;
- }
-
-